package my.jbf.firstGame.GAMEMAP;

import java.util.ArrayList;

import my.jbf.firstGame.MODULE.RandomID;
import my.jbf.firstGame.PLAYER.Bullet;
import my.jbf.firstGame.PLAYER.Enemy;
import my.jbf.firstGame.PLAYER.Player;
import my.jbf.firstGame.PLAYER.Player_BaseData;


public class GameMap
{
    private void testinit()
    {

        Player_BaseData PBD=new Player_BaseData();
        StringBuilder SB=new StringBuilder();
        SB.append(mRandomID.getRandomID("MAP",20));
        PBD._ID=SB.toString();
        PBD._NAME="主角";
        PBD._LV = 5;
        PBD._EXP=560;
        GameMap_Base GMB=new GameMap_Base();
        SB.setLength(0);
        SB.append(mRandomID.getRandomID("USER",20));
        GMB._ID="first";
        GMB.MAPH=8900;
        GMB.MAPW=12000;
        GMB.name="first";

PBD._MapAdress.set(GMB.MAPW/2,GMB.MAPH/2);
PBD._SHAREPATH="";
    }
    private RandomID mRandomID=new RandomID();
    private GameMap_Base mGameMapBase;
    private Player mPlayer;
    private ArrayList<Enemy> mEnemy;
    private  ArrayList<Bullet> mBullet;
   // public GameMap(GameMap_Base GMB,Player_BaseData PBD)
    public GameMap()
    {
        mEnemy= new ArrayList<>();
        mPlayer=new Player();
        mBullet=new ArrayList<>();
        //mGameMapBase=GMB;
       // mPlayer.setPlayerBaseData(PBD);
        testinit();
    }
    public void setGameMapBase(GameMap_Base GB)
    {
        mGameMapBase=GB;
    }

    public GameMap_Base getmGameMapBase() {
        return mGameMapBase;
    }
    public Player_BaseData getPlayerData()
    {
        return mPlayer.getPlayerBaseData();
    }
    public ArrayList<Enemy> getEnemy()
    {
        return mEnemy;
    }
    public ArrayList<Bullet> getBullet()
    {
        return mBullet;
    }
}